<?php
/**
 * @author Radovan Dvorsky
 * @version 20100513
 */
require_once ('application/default/models/Db/Model/ModelAbstract.php');

class Db_Model_StObory extends Db_Model_Abstract {
	
	protected $Id_oboru;
	protected $Obor;
	protected $subjects = array();
	
	/**
	 * @return the $Id_oboru
	 */
	public function getId_oboru() {
		return $this->Id_oboru;
	}

	/**
	 * @return the $Obor
	 */
	public function getObor() {
		return $this->Obor;
	}

	/**
	 * @param $Id_oboru the $Id_oboru to set
	 */
	public function setId_oboru($Id_oboru) {
		$this->Id_oboru = $Id_oboru;
	}

	/**
	 * @param $Obor the $Obor to set
	 */
	public function setObor($Obor) {
		$this->Obor = $Obor;
	}

	/**
	 * @param $subjects the $subjects to set
	 */
	public function setSubjects($subjects) {
		$this->subjects = $subjects;
	}
	
	public function addSubject(Db_Model_Subject $subject){
		
		if(!$subject instanceof Db_Model_Subject){
			throw new Exception('$subject is not instance of Db_Model_Subject');
		}
		
		$this->subjects[] = $subject;
	}
}

?>